﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Langben.DAL
{
    [MetadataType(typeof(contractMetadata))]//使用contractMetadata对contract进行数据验证
    public partial class contract : IBaseEntity
    {
      
        #region 自定义属性，即由数据实体扩展的实体
        
        [Display(Name = "zha_ID")]
        public string zha_IDOld { get; set; }
        
        #endregion

    }
    public class contractMetadata
    {
			[ScaffoldColumn(false)]
			[Display(Name = "ID", Order = 1)]
			public object ID { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "zha_ID", Order = 2)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object zha_ID { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "serialId", Order = 3)]
			[StringLength(100, ErrorMessage = "长度不可超过100")]
			public object serialId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "name", Order = 4)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object name { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "merchant", Order = 5)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object merchant { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "registerTime", Order = 6)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]

			public DateTime? registerTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "totalMoney", Order = 7)]
			public object totalMoney { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceNumber", Order = 8)]
			[Range(0,2147483646, ErrorMessage="数值超出范围")]
			public int? deviceNumber { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "bankNumber", Order = 9)]
			[Range(0,2147483646, ErrorMessage="数值超出范围")]
			public int? bankNumber { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "bank", Order = 10)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object bank { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "IsImport", Order = 11)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object IsImport { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "company", Order = 12)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object company { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "foreignPrice", Order = 13)]
			public object foreignPrice { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "jiaohuoTime", Order = 14)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]

			public DateTime? jiaohuoTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "contactName", Order = 15)]
			[StringLength(100, ErrorMessage = "长度不可超过100")]
			public object contactName { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "contactTelephone", Order = 16)]
			[StringLength(100, ErrorMessage = "长度不可超过100")]
			public object contactTelephone { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "CreateTime", Order = 17)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			public DateTime? CreateTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "CreatePerson", Order = 18)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object CreatePerson { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "UpdateTime", Order = 19)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			public DateTime? UpdateTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "UpdatePerson", Order = 20)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object UpdatePerson { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "remark", Order = 21)]
			[StringLength(2000, ErrorMessage = "长度不可超过2000")]
			public object remark { get; set; }


    }


}

